package com.ruoyi.project.data.internal.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.data.internal.mapper.InternalCaseLibraryMapper;
import com.ruoyi.project.data.internal.domain.InternalCaseLibrary;
import com.ruoyi.project.data.internal.service.IInternalCaseLibraryService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 内部案例库Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-27
 */
@Service
public class InternalCaseLibraryServiceImpl implements IInternalCaseLibraryService 
{
    @Autowired
    private InternalCaseLibraryMapper internalCaseLibraryMapper;

    /**
     * 查询内部案例库
     * 
     * @param id 内部案例库主键
     * @return 内部案例库
     */
    @Override
    public InternalCaseLibrary selectInternalCaseLibraryById(Long id)
    {
        return internalCaseLibraryMapper.selectInternalCaseLibraryById(id);
    }

    /**
     * 查询内部案例库列表
     * 
     * @param internalCaseLibrary 内部案例库
     * @return 内部案例库
     */
    @Override
    public List<InternalCaseLibrary> selectInternalCaseLibraryList(InternalCaseLibrary internalCaseLibrary)
    {
        return internalCaseLibraryMapper.selectInternalCaseLibraryList(internalCaseLibrary);
    }

    /**
     * 新增内部案例库
     * 
     * @param internalCaseLibrary 内部案例库
     * @return 结果
     */
    @Override
    public int insertInternalCaseLibrary(InternalCaseLibrary internalCaseLibrary)
    {
        return internalCaseLibraryMapper.insertInternalCaseLibrary(internalCaseLibrary);
    }

    /**
     * 修改内部案例库
     * 
     * @param internalCaseLibrary 内部案例库
     * @return 结果
     */
    @Override
    public int updateInternalCaseLibrary(InternalCaseLibrary internalCaseLibrary)
    {
        return internalCaseLibraryMapper.updateInternalCaseLibrary(internalCaseLibrary);
    }

    /**
     * 批量删除内部案例库
     * 
     * @param ids 需要删除的内部案例库主键
     * @return 结果
     */
    @Override
    public int deleteInternalCaseLibraryByIds(String ids)
    {
        return internalCaseLibraryMapper.deleteInternalCaseLibraryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除内部案例库信息
     * 
     * @param id 内部案例库主键
     * @return 结果
     */
    @Override
    public int deleteInternalCaseLibraryById(Long id)
    {
        return internalCaseLibraryMapper.deleteInternalCaseLibraryById(id);
    }
}
